#pragma once
#include "GRiPreInclude.h"
#include "GRiTexture.h"
#include <GGenericInfra/GMath.h>
#include "GRiVertex.h"
enum class BRDF
{
	Lambert
};
struct GRiMaterial
{
public:

	BRDF type = BRDF::Lambert;
	GMath::Vector3 kd = GMath::Vector3(0.1f);
	GMath::Vector3 ks = GMath::Vector3(0.1f);
	GMath::Vector3 ka = { 0.1f,0.1f,0.1f };
	float alpha = 32;

	bool mBUseAlbedo;
	std::string mTexAlbedo;

	bool mBUseBump;
	std::string mTexBump;

	// v : 着色点
	// wi: 光线入射方向(**取负**)
	// wo: 光线出射方向
	///	    eye(wo)\	 / obj(wi)
	///				\   /	
	///              \ /
	///          shaderPoint(v)
	GMath::Vector3 BRDF(const GRiVertex& v, const GMath::Vector3& wi, const GMath::Vector3& wo)const;
	
	// v : 着色点
	// wi: 光线入射方向(**取负**)
	// wo: 光线出射方向
	float PDF(const GRiVertex& v, const GMath::Vector3& wi, const GMath::Vector3& wo)const;
};

